'''
Created on 23/11/2010

@author: Nami
'''

import gameobjects
from gameobjects.vector2 import Vector2
import random

class Bullet(object):
    '''
    classdocs
    '''

    def __init__(self,parent,d):
        '''
        Constructor
        '''
        self.order = int(d.order)
        self.id = str(random.random() * random.random())
        self.type = int(d.type)
        self.image = d.image
        self.scale = float(d.scale)
        self.damage = int(d.damage)
        self.energy = int(d.energy)
        self.speed = int(d.speed)
        self.position_offset = Vector2(int(d.offset_x),int(d.offset_y))
        self.angle_offset = int(d.angle_offset)
        self.time_offset = float(d.time_offset)